package simpleFacvtory;

public class TrafficFactory {
    private TrafficFactory(){}
    public static transport made(String type){
        switch (type){
            case "火车":return new Train();
            case "汽车":return new Car();
//            case "拖拉机":return new Train();break;
            default:return null;
        }
    }
}
